home *** CD-ROM | disk | FTP | other *** search
- #define CURSES_LIBRARY 1
- #include <curses.h>
-
- #ifdef PDCDEBUG
- char *rcsid__newline = "$Header: C:\CURSES\private\RCS\_newline.c 2.1 1993/06/18 20:23:30 MH Rel MH $";
- #endif
-
-
-
-
- /*man-start*********************************************************************
-
- PDC_newline() - Advances 1 newline from supplied line number.
-
- PDCurses Description:
- This is a private PDCurses routine.
-
- Does line advance and returns the new cursor line. If error,
- return -1.
-
- PDCurses Return Value:
- This function returns OK on success and ERR on error.
-
- PDCurses Errors:
- No errors are defined for this function.
-
- Portability:
- PDCurses int PDC_newline( WINDOW* win, int lin );
-
- **man-end**********************************************************************/
-
- int PDC_newline(WINDOW *win, int lin)
- {
- #ifdef PDCDEBUG
- if (trace_on) PDC_debug("PDC_newline() - called: line %d\n",lin);
- #endif
-
- if (win == (WINDOW *)NULL)
- return( -1 );
-
- if (++lin > win->_bmarg)
- {
- lin--;
- if (win->_scroll)
- scroll(win);
- else
- return( -1 );
- }
- return( lin );
- }
-